<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
<title>FINIAC | Finance Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function formReset()
{
document.getElementById("frm1").reset();
}
</script>

<script language="JavaScript" src="../html/calendar_us.js"></script>
<script src="../script/jquery-1.7.1.min.js" type="text/javascript"></script>
	<link rel="stylesheet" href="../html/calendar.css">
<link href="../css/styles.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

<script type="text/javascript">
$(function()
		{
		$('#admissionNo').blur(function()
		{
		var ad = $(this).val();
		if(ad)
		{

		$.ajax({
		type: "GET",
		url: "autoComStudent.htm",
		data: {adNo: ad },
		cache: false,
		success: function(html){
		$("#autoScript").append(html);
		}
		});
		}

		return false;
		});
		});
function fill(name,branch,yearOfAdmission) {
$('#name').val(name);
$('#branch').val(branch);
$('#yearOfAdmission').val(yearOfAdmission);
}
</script>
<script type="text/javascript">

function validate(form){
var name = form.product.value;
var qty = parseFloat(form.qtyAvail.value);
var date=form.dateLastPurchase.value;

var errors = [];
 
 if (!name) {
  errors[errors.length] = "Enter product name or product code .";
 }
 if (!qty) {
  errors[errors.length] = "Quantity must be greater than 0.";
 }
 if (!date) {
	  errors[errors.length] = "Select date of purchase .";
	 }
 if (errors.length > 0) {

  reportErrors(errors);
  return false;
 }
  return true;
}
function reportErrors(errors){
 var msg = "Please Enter Valide Data...\n";
 for (var i = 0; i<errors.length; i++) {
 var numError = i + 1;
  msg += "\n" + numError + ". " + errors[i];
}
 alert(msg);
}
function initForm(){
	var d= new Date();
	oFormObject = document.forms['addStock'];
	oFormObject.elements["qtyAvail"].value = '';
	oFormObject.elements["purchasePrice"].value = '';
	oFormObject.elements["dateLastPurchase"].value = d.getMonth()+1+"/"+d.getDate()+"/"+d.getFullYear();
	
}
</script>


</head>

<body>
<div id="autoScript"></div>
<form action="addUpdateListDailyFeeReg.htm" method="post">
<table width="100%" border="0">

		<tr>
			<td><span class="Bredcrumbs">Fee&gt;&gt; Daily Fee&gt;&gt;</span></td>
		</tr>
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="9"><img src="../images/Tright_03_01.gif" width="9"
						height="29"></td>
					<td background="../images/Tcenter.gif" class="body"><strong
						class="boxheader"> Update Daily Fee </strong></td>

					<td width="10"><img src="../images/Tright_1_01.gif" width="9"
						height="29"></td>
				</tr>
				<tr>
					<td height="452" valign="top" background="../images/Tright_03_03.gif"></td>
				  <td valign="top" class="news">
					<table width="100%" cellspacing="1" cellpadding="2">
						<tr bgcolor="#FFFFFF">
							<td height="20" colspan="4">
							<div align="right">
							  <div id="div"><FONT color="red"></FONT> <FONT color="green"> </FONT>
                               <div align="left" class="mandatoryfield"><b>Use this form only to edit daily fee.</b></div>
                                  <div align="right" class="mandatoryfield">*Mandatory fields </div>
						      </div>
							</div>
							<div id="errorMessage"><FONT color="red"></FONT>
							<FONT color="green">  </FONT></div>
							</td>
						</tr>

						<tr>
							<td valign="top" class="news">
							<table width="100%" border="0" align="center" cellpadding="0"
								cellspacing="0">
								<tr>
									<td><img src="../images/01.gif" width="5" height="5" /></td>
									<td width="914" background="../images/02.gif"></td>
									<td><img src="../images/03.gif" width="5" height="5" /></td>
								</tr>
								<tr>
									<td width="5" background="../images/left.gif"></td>
									<td valign="top">
									<table width="100%" cellspacing="1" cellpadding="2">
					

						<tr>
							<input type="hidden" value="${fee.id }"/>
							<td width="13%" height="25" class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Admission No:</div>
							</td>
							<td width="33%" height="25" class="row-even"><span
								class="star">
							  <input type="text" id="admissionNo" class="row-white" value="${fee.admissionNo }"  name=""admissionNo"" autocomplete="off"/>
							</span></td>
							<td width="15%" class="row-odd">
							<div align="right">Name:</div>
							</td>

							<td width="39%" class="row-even"><input type="text" id="name" class="row-white" value="${fee.name }" name="name" readonly="readonly"/>
							</td>
						</tr>
						<tr>
						
						<td class="row-odd">
							<div align="right">Branch:</div>
							</td>
							<td class="row-even"><span class="star"> <input type="text" value="${fee.branch }" id="branch" name="branch" class="row-white" readonly="readonly"/></span></td>
							<td height="25" class="row-odd">
							<div align="right">Year of Admission:</div></td>
							<td height="25" class="row-even"><input name="yearOfAdmission" id="yearOfAdmission" value="${fee.yearOfAdmission }" class="row-white" autocomplete="off" readonly="readonly"/></td>
							
						</tr>

						<tr>
							<td class="row-odd">
							<div align="right"><span class="Mandatory">*</span>Category:</div>
							</td>
							<td class="row-even"><span class="star"><select name="category" id="category">
				<option>SELECT</option>								
								<option value="library fine">LIBRARY FINE</option>
								<option value="sports fine">SPORTS FINE</option>
								<option value="id card fine">ID CARD FINE</option>
							</select></span></td>
<td class="row-odd">
							<div align="right">Date:</div>
							</td>
							<td class="row-even"><span class="star"> <input type="text" id="date" name="date" class="row-white"/></span></td>
						
							

						
						</tr>
<tr>
						
						<td class="row-odd">
							<div align="right">Amount:</div>
							</td>
							<td class="row-even"><span class="star"> <input type="text" id="amount" name="amount" class="row-white"/></span></td>
							
							
						</tr>

						
						<tr>
							<td height="25" colspan="4">
						
							</td>
						</tr>

							</table>
							    </td>
									<td width="5" height="29" background="../images/right.gif"></td>
								</tr>
			
								<tr>
									<td height="5"><img src="../images/04.gif" width="5" height="5" /></td>
									<td background="../images/05.gif"></td>
									<td><img src="../images/06.gif" /></td>
								</tr>
							</table>
							</td>
							<td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
						</tr>


						<tr>
							<td height="25" colspan="4">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="45%" height="35">
									<div align="right">
										
										
											<input type="submit" name="submit" value="Submit"  class="formbutton">
										
									</div>
									</td>
									<td width="2%"></td>
									<td width="53%">
										
										
											<input type="reset" name="reset" value="Reset" onClick="formReset()" class="formbutton">
										
									</td>
								</tr>
								
							</table>
							
							</td>
						</tr>

					<tr>
						<td valign="top" class="news">
						<table width="100%" border="0" align="center" cellpadding="0"
							cellspacing="0">
							
							

						
					</table>
					</td>
					<td valign="top" background="../images/Tright_3_3.gif" class="news"></td>
				</tr>


					</table>
					</td>
					<td width="10" valign="top" background="../images/Tright_3_3.gif"
						class="news"></td>
				</tr>

				<tr>
					<td valign="top" background="../images/Tright_03_03.gif"></td>
					<td height="20" valign="top"></td>
					<td width="13" valign="top" background="../images/Tright_3_3.gif"
						class="news"></td>
				</tr>
				<tr>
					<td><img src="../images/Tright_03_05.gif" width="9" height="29" /></td>
					<td width="100%" background="../images/TcenterD.gif"></td>
					<td><img src="../images/Tright_02.gif" width="9" height="29" /></td>
				</tr>
			</table>
			</td>
		</tr>

	</table>
</form>
</body>
</html>